package graph;

public class WUGraphTestCode {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		WUGraph g = new WUGraph();
		String a = new String("A");
		String b = new String("B");
		String c = new String("C");
		String d = new String("D");
		String e = new String("E");
		String f = new String("F");





		System.out.println("\nTesting addVertex");
		g.addVertex(f);
		g.addVertex(a);
		g.addVertex(b);
		g.addVertex(c);
		g.addVertex(d);
		g.addVertex(e);
		System.out.println("WUGraph should have no edges and 6 vertices:");
		System.out.println("F, A, B, C, D, E");
		System.out.println("Vertex should be 6: " + g.vertexCount());
		System.out.println("EdgeCount should be 0: " + g.edgeCount());
		System.out.println(g);

		System.out.println("\nTesting removeVertex");
		g.removeVertex(f);
		g.removeVertex(c);
		g.removeVertex(d);
		g.removeVertex(e);
		System.out.println("WUGraph should have no edges and 2 vertices:");
		System.out.println("A, B");
		System.out.println("Vertex should be 2: " + g.vertexCount());
		System.out.println("EdgeCount should be 0: " + g.edgeCount());
		System.out.println(g);

		System.out.println("\nTesting addEdge");
		g.addVertex(c);
		g.addVertex(d);
		g.addVertex(e);
		g.addVertex(f);
		g.addEdge(a, a, 1);
		g.addEdge(a, b, 2);
		g.addEdge(a, c, 3);
		g.addEdge(a, d, 4);
		g.addEdge(a, e, 5);
		g.addEdge(a, f, 6);
		System.out.println("WUGraph should have 6 edges all starting at A and connecting to all vertices");
		System.out.println("EdgeCount should be 6: " + g.edgeCount());
		System.out.println(g);
		
		System.out.println("\nTesting weight()");
		int weight = 0;
		weight = g.weight(a, a); 
		System.out.println("(A,A) weight is 1: " + weight);
		weight = g.weight(a, b);
		System.out.println("(A,A) weight is 2: " + weight);
		weight = g.weight(a, c);
		System.out.println("(A,A) weight is 3: " + weight);
		weight = g.weight(a, d);
		System.out.println("(A,A) weight is 4: " + weight);
		weight = g.weight(a, e);
		System.out.println("(A,A) weight is 5: " + weight);
		weight = g.weight(a, f);
		System.out.println("(A,A) weight is 6: " + weight);
		
		

	}

}

